$PBExportHeader$uo_tab_sql.sru
forward
global type uo_tab_sql from uo_tab
end type
end forward

global type uo_tab_sql from uo_tab
int Width=1655
int Height=1088
end type
global uo_tab_sql uo_tab_sql

type variables
string	is_sqlprev[], is_sqlinsert[]
end variables

forward prototypes
public function integer uof_getsqlprev (ref string as_sql[])
public function integer uof_getsqlinsert (ref string as_sql[])
end prototypes

public function integer uof_getsqlprev (ref string as_sql[]);as_sql = is_sqlprev

return 1
end function

public function integer uof_getsqlinsert (ref string as_sql[]);as_sql = is_sqlinsert

return 1
end function

event ue_confirmar;Integer	iAux, cantidad,	li_cont
string	ls_sqlprev[], ls_sqlprevinsert[],	ls_reset[]

cantidad = UpperBound(tp[])

is_sqlprev[] = ls_reset[]
is_sqlinsert[] = ls_reset[]

FOR iAux = 1 TO cantidad 

	If not(tp[iAux].Event Trigger ue_confirmar(barg_accept, FALSE)) Then Return(FALSE)
	tp[iAux].dynamic uof_getsqlprev(ls_sqlprev[])
	for li_cont =lowerbound(ls_sqlprev[]) to upperbound(ls_sqlprev[])
		is_sqlprev[upperbound(is_sqlprev[])+1] = ls_sqlprev[li_cont]
	next

	tp[iAux].Event Dynamic ue_creasqlinsert()
	tp[iAux].dynamic uof_getsqlprev(ls_sqlprevinsert[])
	for li_cont =lowerbound(ls_sqlprevinsert[]) to upperbound(ls_sqlprevinsert[])
		is_sqlinsert[upperbound(is_sqlinsert[])+1] = ls_sqlprevinsert[li_cont]
	next	
	
NEXT

return true
end event

